﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yammu.Core.MediaManagement;

namespace Yammu.Core.Playlist
{
    /// <summary>
    /// Represents a playlist. A playlist contains a list of playlist items which can be either playlists or individual media items
    /// </summary>
    public interface IPlaylist : IPlaylistItem
    {

        /// <summary>
        /// Returns the list of playlist items
        /// </summary>
        /// <value>The items.</value>
        IList<IPlaylistItem> Items { get; }

        /// <summary>
        /// Returns the count of the items in the playlist
        /// </summary>
        long Count { get; }

        /// <summary>
        /// Appends the given item to the end of the playlist
        /// </summary>
        /// <param name="item"></param>
        void AppendItem(IPlaylistItem item);

        /// <summary>
        /// Moves the item at the oldIndex to newIndex
        /// </summary>
        /// <param name="oldIndex"></param>
        /// <param name="newIndex"></param>
        void MoveItem(long oldIndex, long newIndex);

        /// <summary>
        /// Inserts a media item at the given location
        /// </summary>
        /// <param name="index"></param>
        /// <param name="item"></param>
        void InsertItem(long index, IPlaylistItem item);

        /// <summary>
        /// Remove the given item from the playlist
        /// </summary>
        /// <param name="item"></param>
        void RemoveItem(IPlaylistItem item);

    }

   
}
